import Vue from 'vue'
// 安装插件
import VueI18n from 'vue-i18n'
// 安装插件
Vue.use(VueI18n)
// 引入 element 语言包
import enElement from 'element-ui/lib/locale/lang/en'
import zhElement from 'element-ui/lib/locale/lang/zh-CN'
import chaNa from './zh'
import Eng from './en'
// 创建实例
export default new VueI18n({
  locale: localStorage.getItem('Lang') || 'zh',
  messages: {
    zh: {
      morning: '早上好',
      goodday: '祝你开心每一天',
      dog: '谢玉山猪狗不如',
      cut: '切换成功',
      ...enElement,
      ...chaNa
    },
    en: {
      morning: 'Good Morning',
      goodday: 'Have a nice day',
      dog: 'xie jade mountain  pig dog inferior to',
      cut: 'switchover',
      ...zhElement,
      ...Eng
    }
  }
})
